<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div{
            height: 200px;
            width:200px;
            background: red;
        }
    </style>
</head>
<body>
    <div>

    </div>
    <script>
        /* scrollHeight,scrollWidth  获取滚动区域的宽高 */
        console.log(document.documentElement.scrollHeight)
        console.log(document.documentElement.scrollWidth)
    </script>
</body>
</html>